#ifndef MAINWINDOW_H
#define MAINWINDOW_H

#include <QMainWindow>
#include<QCloseEvent>

class QAction;

namespace Ui {
class MainWindow;
}

class MainWindow : public QMainWindow
{
    Q_OBJECT

public:
    explicit MainWindow(QWidget *parent = 0);
    void savefile(const QString &filename);
    void changetitle(const QString &filename);
    void openfile(const QString  &filename);

    ~MainWindow();

private:
    Ui::MainWindow *ui;
     //QString
     QString curFile;

private slots:
     void openfile_on();
     bool save();
     void quitfile();
     void aboutfile();
     bool saveAs();
     void new_on();
     void font_on();

//     void find();



protected:
     void closeEvent(QCloseEvent *event);

};

#endif // MAINWINDOW_H
